package com.intretech.umsin.code.generator.provider;


import freemarker.template.TemplateMethodModel;
import freemarker.template.TemplateModelException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class TemplateMethodForGetDataType implements TemplateMethodModel {
	
/*
	@Autowired
	@Lazy
	private SchemaProviderFactory schemaProviderFactory;
*/

	@Autowired
	private DbDataTypeToJavaDataType dbDataTypeToJavaDataType;

	@Override
	public Object exec(List arg0) throws TemplateModelException {
		return dbDataTypeToJavaDataType.getDataType(arg0.get(0).toString());
		//return schemaProviderFactory.createDbSchemaProvider().getDataType(arg0.get(0).toString());
	}

}
